<!-- 搜索框及工具条 -->
<div class="c-head-box">
    <form method="get" action="{:Url('admin_list')}">
    <ul>
        <li class="c-head-search">
            <!-- 搜索条件 -->
            <ul>
                <li><span>管理员类型：</span>{:widget('common/Select/select',array('admin_super','admin_super',$admin_super))}</li>
                <li><span>管理员角色：</span>{:widget('common/Select/select',array('role_id',array($role_list,'admin_role_id','role_name'),$role_id))}</li>
                <li><span>管理员名称：</span><input type="text" name="real_name" value="{$real_name}"/></li>
                <li><span>管理员电话：</span><input type="text" name="admin_phone" value="{$admin_phone}"/></li>
            </ul>
        </li>
        <li class="c-head-button">
            <!-- 操作按钮 -->
            <div class="fr"><input type="submit" class="but_blue" value="搜索"></div>
            <div class="fr"><a class="but_blue" href="{:Url('admin_add')}">添加</a></div>
        </li>
    </ul>
    </form>
</div>

<!--用户列表-->
<div class="lists-tab-cont">
    <div class="lists-table">
        <table class="pointer" cellpadding="0" cellspacing="0" border="0">
            <thead>
            <tr>
                <th style="width: 10%" class="tabSort-header"><a class="tabSort-header-inner"><p>登录账户</p></a></th>
                <th style="width: 10%" class="tabSort-header"><a class="tabSort-header-inner"><p>姓名</p></a></th>
                <th style="width: 10%" class="tabSort-header"><a class="tabSort-header-inner"><p>电话</p></a></th>
                <th style="width: 8%" class="tabSort-header"><a class="tabSort-header-inner"><p>角色类型</p></a></th>
                <th style="width: 8%" class="tabSort-header"><a class="tabSort-header-inner"><p>角色名称</p></a></th>
                <th style="width: 10%" class="tabSort-header"><a class="tabSort-header-inner"><p>注册时间</p></a></th>
                <th style="width: 10%" class="tabSort-header"><a class="tabSort-header-inner"><p>最后登录时间</p></a></th>
                <th style="width: 10%" class="tabSort-header"><a class="tabSort-header-inner"><p>备注</p></a></th>
                <th class="tabSort-header"><a class="tabSort-header-inner"><p>操作</p></a></th>
            </tr>
            </thead>
            <tbody>
                {foreach name="admin_list" item="info"}
                    <tr>
                        <td>{$info.admin_phone}</td>
                        <td>{$info.real_name}</td>
                        <td>{$info.admin_phone}</td>
                        <td>{:widget('common/Color/color',array('admin_super',$info['admin_super']))}</td>
                        <td>{$info.role_name}</td>
                        <td>{$info.reg_time}</td>
                        <td>{$info.login_time}</td>
                        <td>{$info.remark}</td>
                        <td>
                            <a href="{:Url('admin_edit',array('admin_id'=>$info['admin_id']))}" class="blue">编辑</a>
                            <a data-type="info-win" data-src="{:Url('admin_info',array('admin_id'=>$info['admin_id']))}" data-title="详情" data-width="40%" data-height="40%" class="blue">详情</a>
                            {eq name="info['is_delete']" value="2"}
                                <a href="{:Url('admin_reset',array('admin_id'=>$info['admin_id']))}" class="info1" style="color: red;">启用</a>
                            {else/}
                                <a href="{:Url('admin_del',array('admin_id'=>$info['admin_id']))}" class="blue info2">禁用</a>
                            {/eq}
                            <a href="{:Url('admin_reset_pwd',array('admin_id'=>$info['admin_id']))}" class="blue info3">重置密码</a>
                        </td>
                    </tr>
                {/foreach}
            </tbody>
        </table>
    </div>

    <!-- 翻页模板 -->
    <div class="page">
        {$Think.config.page_html}
    </div>
</div>

<!-- JS处理 -->
<script language="javascript">
    $(function(){
        //提示信息
        $("a.info1").click(function(){
            if(confirm("您确定要启用这个用户吗？")){
                return true;
            }else{
                return false;
            }
        });

        //提示信息
        $("a.info2").click(function(){
            if(confirm("您确定要禁用这个用户吗？")){
                return true;
            }else{
                return false;
            }
        });

        //提示信息
        $("a.info3").click(function(){
            if(confirm("您确定要重置密码吗？")){
                return true;
            }else{
                return false;
            }
        });
    });
</script>